#ifndef _BARTER_SERVER_AES_H_
#define _BARTER_SERVER_AES_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct StateAES_t
{
	unsigned char Key[16];
	unsigned char Buffer[16];
	unsigned long KeyExpansion[60];
} StateAES;

/*
	Build key sequence and initialize the buffer with IV
*/
int AES_Init(StateAES*, unsigned char key[16]);
int AES_Encrypt(StateAES*, unsigned char block[16]);
int AES_Decrypt(StateAES*, unsigned char block[16]);
int AES_Final(StateAES*, unsigned char out[16]);

#ifdef __cplusplus
}
#endif

#endif // _BARTER_SERVER_AES_H_
